package cn.wolfcode.common.utils;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

public abstract class PhoneUtils {
    public static boolean isPhoneNumber(String phoneNumber){
        if(StringUtils.isEmpty(phoneNumber)){
            return false;
        }
        /*Pattern pattern = Pattern.compile("^1[3|4|5|6|7|8|9][0-9]\\d{8}$");
        Matcher matcher = pattern.matcher(phoneNumber);
        // 匹配
        return matcher.matches();*/
        return phoneNumber.matches("^1[3-9][0-9]\\d{8}$");
    }
}
